package com.qianfeng.tiantian_banjia.adapter;

import java.util.List;

import com.qianfeng.tiantian_banjia.utils.AsyncImageLoader;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class MyBaseAdpter<T> extends BaseAdapter {
public Context context;
public LayoutInflater inflater;
public List<T> list;
public AsyncImageLoader loader;
public MyBaseAdpter(Context context,List<T> list,AsyncImageLoader loader){
	this.context=context;
	this.list=list;
	inflater=LayoutInflater.from(context);
	this.loader=loader;
	//loader=new AsyncImageLoader(context);
	
}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return list.get(position);
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		
		return getConvertView(position, convertView, parent);
	}
	public abstract View getConvertView(int position, View convertView, ViewGroup parent);

}
